import Vue from 'vue'
import App from './App.vue'

import VueRouter from 'vue-router'

import Home from './views/Home.vue'
import Search from './views/Search.vue'
import Play from './views/Play.vue'


import MusicMc from './assets/MusicMc'
import MusicFm from './assets/MusicFm'
import MusicDj from './assets/MusicDj'



import DJ from './components/Dj'
import FM from './components/Fm'
import MC from './components/Mc'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    redirect: '/home'//重定向
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '/play',
    component: Play,
    children: [
      {
        path: '/',
        redirect: 'musicmc'//重定向
      },
      {
        path: 'musicmc',
        component: MusicMc
      },
      {
        path: 'musicfm',
        component: MusicFm
      },
      {
        path: 'musicdj',
        component: MusicDj,
        children: [
          // {
          //   math: '/',
          //   redirect: '/dj'
          // },
          {
            path: 'dj',
            component: DJ
          },
          {
            path: 'fm',
            component: FM
          }, {
            path: 'mc',
            component: MC
          },
        ]
      }
    ]
  }
]

const router = new VueRouter({
  routes
})
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
